Elastic scaling of a virtual machine cluster refers to adding virtual machines to the cluster or replacing original virtual machines with highly configured virtual machines, or removing virtual machines from the cluster or replacing original virtual machines with lowly configured virtual machines as required, so as to reduce the costs of the entire virtual machine cluster, and improve the input-output ratio of the virtual machine cluster.
In the prior art, virtual machines in a virtual machine cluster have completely the same configuration level, and the elastic scaling of the cluster is generally implemented by monitoring the status of the cluster and adaptively adjusting the number of virtual machines in the cluster. For example, a new virtual machine is added to the cluster when it is detected that an indicator such as CPU usage, memory usage, and network traffic of the virtual machine exceeds a threshold, and a virtual machine is released from the cluster when it is detected that the above-mentioned indicator exceeds another threshold.
However, the above-mentioned technology of elastically scaling a virtual machine cluster based on monitoring has the following problems: since a delay is introduced due to monitoring, no virtual machine can be added to or removed from the cluster until monitoring data is collected and the collected monitoring data reaches a threshold. In addition, the creation of a new virtual machine takes some time, resulting in a long delay of the entire scaling process. In addition, virtual machines of the same structure have the same configuration level, making it difficult to maximize the resource utilization rate of virtual machines through the deployment of mixed service.